<?php use_helper('JQuery') ?>
<script type="text/javascript">
    $(document).ready(function(){
        $("#enlaceResumen").click(function(evento){
            $("#ajaxmodal").css({"display":"inline","position":"fixed","width":"180%","background":"rgba(0,0,0,.8)","height":"180%","background:":"#000000","z-index":"100","top":"0","left":"0"});
            $("#imageajax").css({"display": "inline","position":"absolute","top":"200px","left":"50%","width":"650px","height":"100px","display": "inline","margin-left":"-950px","margin-right":"-300px","background":"#f7fbfc","z-index":"101","padding":"30px 40px 34px"});
      
      
            $().reload("<?php echo url_for('Reportes/ResumenFondo') ?>", function(){

                $("#ajaxmodal").css("display", "none");
                $("#imageajax").css("display", "none");
     
            });

        });
  
        $("#enlaceResumenC").click(function(evento){
            $("#ajaxmodal").css({"display":"inline","position":"fixed","width":"180%","background":"rgba(0,0,0,.8)","height":"180%","background:":"#000000","z-index":"100","top":"0","left":"0"});
            $("#imageajax").css({"display": "inline","position":"absolute","top":"200px","left":"50%","width":"650px","height":"100px","display": "inline","margin-left":"-950px","margin-right":"-300px","background":"#f7fbfc","z-index":"101","padding":"30px 40px 34px"});
      
      
            $().reload("<?php echo url_for('Reportes/ResumenFondo') ?>", function(){

                $("#ajaxmodal").css("display", "none");
                $("#imageajax").css("display", "none");
     
            });

        });
 
    });
</script>
<div id="titulosproyecto" align="center"><h1>RESUMENES PRESUPUESTARIOS</h1></div><br>

<div id="cajaprincipalproyecto" align="center">
    <div id="cajapresupuestosindex" align="center"><br>
        <?php
        $fondos = Doctrine_Core::getTable('fondo')->createQuery('f')
                ->where('f.id_pro = ?', $proyecto->getIdPro())
                ->execute();


        foreach ($fondos as $fond):
            if ($fond->getDefecto() == 1) {
                ?>
                <a href="<?php echo url_for('Reportes/ResumenFondo?id_pro=' . $proyecto->getIdPro() . '&id_fo=' . $fond->getIdFo()) ?>" id="enlaceResumen"><button class="button button-green"><span><div class="spritesportafoliofondo" id="portafoliofondo_jpg" align="center"></div>Resum&eacute;n&nbsp;<?php echo strtoupper($fond->getSiglasInst())?> </span></button></a>
            <?php } else { ?>
                <a href="<?php echo url_for('Reportes/ResumenFondo?id_pro=' . $proyecto->getIdPro() . '&id_fo=' . $fond->getIdFo()) ?>" id="enlaceResumenC"><button class="button button-green"><span><div class="spriteseditFondoContraparte" id="money-bag_jpg" align="center"></div>Resum&eacute;n&nbsp;<?php echo strtoupper($fond->getSiglasInst())?></span></button></a>
                <?php
            }

        endforeach;
        ?>




        <a href="<?php echo url_for('Reportes/index?id_pro=' . $proyecto->getIdPro()) ?>"><button class="button2 button-green2"><span><div class="spritesatras" id="atras_jpg" align="center"></div>Regresar a Men&uacute; Reportes</span></button></a><br><br>
    </div><br><br><br>
</div><br><br><br>
<div id="ajaxmodal" style="display: none;">
    <div id="imageajax" style="display: none;">
        <b>Su Petición esta siendo Procesada, Por favor Espere unos minutos</b><br><br>
        </bt>        <?php echo image_tag('ajax-loader.gif'); ?>
    </div>    
</div>